<?php

namespace app\admin\controller;

use think\Controller;
use think\Request;
use think\Session;
use think\Url;

class Common extends Controller
{

    public function __construct(Request $request = null)
    {
        if (!Session::has('name')){  //判断session是否存在
            //如果没有登录跳到登录页面
            $this->redirect('admin/Login/login');

        }
    }
}
